package com.inepex.inechart.shared.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.TreeMap;

/**
 * 
 * Helper class for marking intervals in [-{@link Double#MAX_VALUE},{@link Double#MAX_VALUE}] interval
 * 
 * @author Miklós Süveges / Inepex Ltd.
 *
 */

//TODO
public class IntervalMarkerTool {

	protected class Interval implements Comparable<Interval>{
		
		double start;
		double end;
				
		public Interval(double start, double end) {
			super();
			this.start = start;
			this.end = end;
		}

		public double getStart() {
			return start;
		}

		public void setStart(double start) {
			this.start = start;
		}

		public double getEnd() {
			return end;
		}

		public void setEnd(double end) {
			this.end = end;
		}

		@Override
		public int compareTo(Interval other) {
			if(this.start < other.start){
				return -1;
			}
			else if(this.start > other.start){
				return 1;
			}
			else{
				return 0;
			}
		}
		
		
	}
	
	protected static Comparator<Interval> endComparator = new Comparator<IntervalMarkerTool.Interval>() {
		
		@Override
		public int compare(Interval o1, Interval o2) {
			if(o1.end < o2.end){
				return -1;
			}
			else if(o1.end > o2.end){
				return 1;
			}
			else{
				return 0;
			}
		}
	};

	protected ArrayList<Interval> markedIntervals;
	
	
	public IntervalMarkerTool() {
		markedIntervals = new ArrayList<IntervalMarkerTool.Interval>();
	}
	
	public void markInterval(double start, double end){
		
	}
	
	public void unmarkInterval(double start, double end){
		
	}
	
	
}
